﻿using System;

using System.Collections.Generic;
using System.Text;
using Silvermoon.Controls;
using Silvermoon.OpenGL;
using System.Drawing;
using Silvermoon.Utils;
using Silvermoon.UI;
using Silvermoon.Windows;
using Silvermoon.Windows.Styles;
using Silvermoon.Images;
using Silvermoon.Shapes;
using Silvermoon.OpenGL.Native;

namespace Testing
{
    public class TabDemo : DemoWindowBase
    {
        private TabControl tabs;
        private static readonly string[] titles = new string[]
            {
                "All",
                "Favorites",
                "Categories",
                "Recent",
                "Red",
                "Selected",
                "Unselected"};

        public TabDemo()
            : base()
        {
            InitializePage();
        }

        private void InitializePage()
        {
            //            TransitionManager = CoolTransitions.CoolTransition1;
            this.Styles = new MetroStyles();
            SetTransition(300, TransitionMask.RotateLeftIn, TransitionMask.RotateLeftOut | TransitionMask.None);

            tabs = new TabControl { Margin = Margin.Zero };
            foreach (string title in titles)
            {
                TabPage page = new TabPage(
                    title,
                    new Label
                    {
                        Text = "Page\n" + title,
                        Font = FontPool.ItemFont,
                        FontScale = 1.5f,
                        Alignment = Alignment.Center,
                        LineAlignment = Alignment.Center,
                        LineMode = LineMode.WordWrap
                    }
                    );

                tabs.Pages.Add(page);
            }
            Controls.Add(tabs);
        }

    }
}

